package m.toolkit.rrd4j;

/**
 * @author ming
 * @date 2014年2月24日下午10:16:50
 */
public class GraphItem {

	public enum Color {
		白色("#ffffff"), 黑色("#000000"), 红色("#FF0000"), 绿色("#00FF00"), 蓝色("#0000FF");

		private String text;

		Color(String text) {
			this.text = text;
		}
		
		public String getText(){
			return text;
		}
	}

	public enum ItemType {
		//value[#color][:[legend][:STACK][:skipscale][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]
		LINE1,
		LINE2, LINE3,
		//value[#color][:[legend][:STACK][:skipscale]]
		AREA,
		//vname:format
		PRINT, 
		//vname:format
		GPRINT, 
		//text
		COMMENT,
		//ime#color[:legend][:dashes[=on_s[,off_s[,on_s,off_s]...]][:dash-offset=offset]]
		VRULE,
		//vname#rrggbb[aa][:fraction[:legend]]
		TICK,
		//vname:offset
		SHIFT,
		//{left|right|justified|center}
		TEXTALIGN;
	}

	private ItemType itemType;
	private String args;
	
	public String getArgs() {
		return args;
	}
	public void setArgs(String args) {
		this.args = args;
	}
	
	public String getText(){
		return itemType.toString()+":"+args;
	}
	public ItemType getItemType() {
		return itemType;
	}
	public void setItemType(ItemType itemType) {
		this.itemType = itemType;
	}
	
}
